import http from "../uitls/http.js";

// 获取用户的浏览记录
export const getHistoryAPI = () => {
  return http({
    url: `/history`,
    method:'get',
  })
}

// 新增用户的浏览记录 id:小说id
export const postHistoryAPI = (id) => {
  return http({
    url: `/history.${id}`,
    method:'post',
  })
}

// 删除用户的浏览记录 id:小说id
export const delHistoryAPI = (id) => {
  return http({
    url: `/history.${id}`,
    method:'delete',
  })
}

// 修改用户的浏览记录 id:小说id 通常是用户浏览到小说的最新章节
export const putHistoryAPI = (id) => {
  return http({
    url: `/history.${id}`,
    method:'put',
  })
}

